/**
 * Created by TEANA on 2018/1/3.
 */
module.exports = ngModule =>  {
  ngModule.directive('onFinish', function ($timeout) {
    return {
      restrict: 'A',
      link: function (scope, element, attr) {
        if (scope.$last === true) {
          $timeout(function () {
            scope.$emit('ngRepeatFinished');
          });
        }
      }
    };
  });
};
